package cn.wzptsoft.tinymallbe.controller;

import cn.wzptsoft.common.utils.Result;
import cn.wzptsoft.tinymallbe.entity.Sku;
import cn.wzptsoft.tinymallbe.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("spu")
public class SkuController {

    @Autowired
    private SkuService skuService;

    @GetMapping("/sku")
    public Result<List<Sku>> getShopCart(String ids) {
        List<Sku> shopCart = skuService.getShopCart(ids);
        return Result.ok(shopCart);
    }

}
